package com.chen.service.impl;


import com.chen.mapper.EmployeeMapper;
import com.chen.pojo.Employee;
import com.chen.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeServiceImpl implements EmployeeService {


    @Autowired
    private EmployeeMapper employeeMapper;


    @Override
    public List<Employee> getAll() {
        return employeeMapper.getAll();
    }

    @Override
    public Employee getById(Integer id) {
        return employeeMapper.getById(id);
    }

    @Override
    public int deleteEmp(Integer id) {
        return employeeMapper.deleteEmp(id);
    }

    @Override
    public int addEmp(Employee employee) {
        return employeeMapper.addEmp(employee);
    }

    @Override
    public int updateEmp(Employee employee) {
        return employeeMapper.updateEmp(employee);
    }
}
